﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>shopcart</title>

    <link href="/Mjs/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
    <link href="/Mjs/basic/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="/Mjs/css/cartstyle.css" rel="stylesheet" type="text/css" />
    <link href="/Mjs/css/optstyle.css" rel="stylesheet" type="text/css" />
    
    <script src="/Scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/Mjs/js/jquery.js"></script>
    <script type="text/javascript">
        $(function () {
            //单个商品价格
            Price();

            //购物车数量加减
            $(".add").click(function () {
                var t = $(this).parent().find('input[class*=text_box]');
                t.val(parseInt(t.val()) + 1)
                Price();
            })
            $(".min").click(function () {
                var t = $(this).parent().find('input[class*=text_box]');
                t.val(parseInt(t.val()) - 1)
                if (parseInt(t.val()) < 1) {
                    t.val(1);

                }

                Price();
            })
            //购物车数量修改框
            $(".add").parent().find('input[class*=text_box]').keyup(function () {
                Price();
            })
            $(".min").parent().find('input[class*=text_box]').keyup(function () {
                var a = $(this).val();
                if (a == 0 || a == NaN) {
                    $(this).val(1);
                }
                Price();
            })

            //全选
            $("#J_SelectAllCbx2").click(function () {
                var flag = $(this).attr("checked");
                if (flag) {
                    //如果选中，则给下面的每个复选框都选中
                    $("div.bundle-main ul").find(".td-chk").find("input.check").attr("checked", true);
                } else {
                    $("div.bundle-main ul").find(".td-chk").find("input.check").attr("checked", false);
                }
                //总价和数量
                TotalPrice();
            });
            //单选
            $("div.bundle-main ul").find(".td-chk").find("input.check").click(function () {
                //总价和数量
                TotalPrice();
            });

            $("a.delete").click(function () {
                $(this).parents("li.td-op").parent("ul.item-content").remove();
            })
            //var num = $("a.delete:first").parents("li.td-op").parent("ul.item-content").html();
            //alert(num);

        })


        //计算单个商品的价格
        function Price() {
            $("div.bundle-main ul").each(function () {
                var num = parseInt($(this).find("li.td-amount").find(".am-btn").siblings("input.text_box").val());
                var price = parseFloat($(this).find("li.td-price").find("em.J_Price").text());
                var dall = num * price;
                $(this).find(".td-sum").find("em.J_ItemSum").text(dall);

            })
        }
        //计算价格
        function TotalPrice() {
            var allprice = 0; //总价
            var allnum = 0; //商品件数
            var total = 0;
            $("div.bundle-main ul").find(".td-chk").find("input.check").each(function () { //循环店铺里面的商品
                if ($(this).is(":checked")) { //如果该商品被选中

                    var num = parseInt($(this).parents("li.td-chk").siblings("li.td-amount").find("input.text_box").val()); //得到商品的数量
                    var price = parseFloat($(this).parents("li.td-chk").siblings("li.td-sum").find("em.J_ItemSum").text()); //得到商品的单价
                    allnum += num;//商品件数
                    allprice += price;; //计算总价
                    //oprice += total; //计算该店铺的总价
                }
            });
            $("#J_Total").text(allprice.toFixed(2)); //输出全部总价
            $("#J_SelectedItemsCount").text(allnum); //选中件数
        }
        //多选删除
        function Delshop() {
            $("div.bundle-main ul").find(".td-chk").find("input.check").each(function () { //循环店铺里面的商品
                if ($(this).is(":checked")) { //如果该商品被选中
                    $(this).parents("ul.item-content").remove();

                }
            });
        }
        //单行删除
        function D_Delshop() {
           
            //var num=$(this).parents("li.td-op").parent("ul.item-content").html();
            //alert(num);
        }
    </script>
</head>
<body>
    <!--顶部导航条 -->
    <div class="am-container header">
        <ul class="message-l">
            <div class="topMessage">
                <div class="menu-hd">
                    <a href="#" target="_top" class="h">亲，请登录</a>
                    <a href="#" target="_top">免费注册</a>
                </div>
            </div>
        </ul>
        <ul class="message-r">
            <div class="topMessage home">
                <div class="menu-hd"><a href="#" target="_top" class="h">商城首页</a></div>
            </div>
            <div class="topMessage my-shangcheng">
                <div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
            </div>
            <div class="topMessage mini-cart">
                <div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
            </div>
            <div class="topMessage favorite">
                <div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
        </ul>
    </div>

    <!--悬浮搜索框-->

    <div class="nav white">
        <div class="logo">
            <img src="/Mjs/images/logo.png" />
        </div>
        <div class="logoBig">
            <li>
                <img src="/Mjs/images/logobig.png" /></li>
        </div>

        <div class="search-bar pr">
            <a name="index_none_header_sysc" href="#"></a>
            <form>
                <input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
                <input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
            </form>
        </div>
    </div>

    <div class="clear"></div>

    <!--购物车 -->
    <div class="concent">
        <div id="cartTable">
            <div class="cart-table-th">
                <div class="wp">
                    <div class="th th-chk">
                        <div id="J_SelectAll1" class="select-all J_SelectAll">
                        </div>
                    </div>
                    <div class="th th-item">
                        <div class="td-inner">商品信息</div>
                    </div>
                    <div class="th th-price">
                        <div class="td-inner">单价</div>
                    </div>
                    <div class="th th-amount">
                        <div class="td-inner">数量</div>
                    </div>
                    <div class="th th-sum">
                        <div class="td-inner">金额</div>
                    </div>
                    <div class="th th-op">
                        <div class="td-inner">操作</div>
                    </div>
                </div>
            </div>
            <div class="clear"></div>

            <tr class="item-list" id="gc">
                <div class="bundle  bundle-last ">

                    <div class="clear"></div>
                    <div class="bundle-main">
                        <ul class="item-content clearfix">
                            @*操作  复选框*@
                            <li class="td td-chk">
                                <div class="cart-checkbox ">
                                    <input class="check" id="J_CheckBox_170037950254" name="items[]" value="170037950254" type="checkbox">
                                    <label for="J_CheckBox_170037950254"></label>
                                </div>
                            </li>
                            @*商品信息*@
                            <li class="td td-item">
                                <div class="item-pic">
                                    <a href="#" target="_blank" data-title="美康粉黛醉美东方唇膏口红正品 持久保湿滋润防水不掉色护唇彩妆" class="J_MakePoint" data-point="tbcart.8.12">
                                        <img src="/Mjs/images/kouhong.jpg_80x80.jpg" class="itempic J_ItemImg"></a>
                                </div>
                                <div class="item-info">
                                    <div class="item-basic-info">
                                        <a href="#" target="_blank" title="美康粉黛醉美唇膏 持久保湿滋润防水不掉色" class="item-title J_MakePoint" data-point="tbcart.8.11">美康粉黛醉美唇膏 持久保湿滋润防水不掉色</a>
                                    </div>
                                </div>
                            </li>
                            @* 原操作区*@
                            <li class="td td-info">
                                <div class="item-props item-props-can" style="border: none;">
                                </div>
                            </li>
                            @* 价格显示*@
                            <li class="td td-price">
                                <div class="item-price price-promo-promo">
                                    <div class="price-content">
                                        <div class="price-line">
                                            <em class="J_Price price-now" tabindex="0">39.00</em>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            @*商品数量修改*@
                            <li class="td td-amount">
                                <div class="amount-wrapper ">
                                    <div class="item-amount ">
                                        <div class="sl">
                                            <input class="min am-btn" name="" type="button" value="-" />
                                            <input class="text_box" name="coun" type="text" value="3" style="width: 30px;" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}" />
                                            <input class="add am-btn" name="" type="button" value="+" />
                                        </div>
                                    </div>
                                </div>
                            </li>
                            @*该商品的总价格显示*@
                            <li class="td td-sum">
                                <div class="td-inner">
                                    <em tabindex="0" class="J_ItemSum number">117.00</em>
                                </div>
                            </li>
                            @* 操作*@
                            <li class="td td-op">
                                <div class="td-inner">
                                    <a title="移入收藏夹" class="btn-fav" href="#">移入收藏夹</a>
                                    <a href="#" data-point-url="#" class="delete">删除</a>
                                </div>
                            </li>
                        </ul>




                        <ul class="item-content clearfix">
                            <li class="td td-chk">
                                <div class="cart-checkbox ">
                                    <input class="check" id="J_CheckBox_170037950254" name="items[]" value="170037950254" type="checkbox">
                                    <label for="J_CheckBox_170037950254"></label>
                                </div>
                            </li>
                            <li class="td td-item">
                                <div class="item-pic">
                                    <a href="#" target="_blank" data-title="美康粉黛醉美东方唇膏口红正品 持久保湿滋润防水不掉色护唇彩妆" class="J_MakePoint" data-point="tbcart.8.12">
                                        <img src="/Mjs/images/kouhong.jpg_80x80.jpg" class="itempic J_ItemImg"></a>
                                </div>
                                <div class="item-info">
                                    <div class="item-basic-info">
                                        <a href="#" target="_blank" title="美康粉黛醉美唇膏 持久保湿滋润防水不掉色" class="item-title J_MakePoint" data-point="tbcart.8.11">美康粉黛醉美唇膏 持久保湿滋润防水不掉色</a>
                                    </div>
                                </div>
                            </li>
                            <li class="td td-info">
                                <div class="item-props item-props-can">
                                    @* <span class="sku-line">颜色：12#川南玛瑙</span>
                                    <span class="sku-line">包装：裸装</span>
                                    <span tabindex="0" class="btn-edit-sku theme-login">修改</span>
                                    <i class="theme-login am-icon-sort-desc"></i>*@
                                </div>
                            </li>
                            <li class="td td-price">
                                <div class="item-price price-promo-promo">
                                    <div class="price-content">
                                       
                                        <div class="price-line">
                                            <em class="J_Price price-now" tabindex="0">39.00</em>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li class="td td-amount">
                                <div class="amount-wrapper ">
                                    <div class="item-amount ">
                                        <div class="sl">
                                            <input class="min am-btn" name="" type="button" value="-" />
                                            <input class="text_box" name="" type="text" value="3" style="width: 30px;" />
                                            <input class="add am-btn" name="" type="button" value="+" />
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li class="td td-sum">
                                <div class="td-inner">
                                    <em tabindex="0" class="J_ItemSum number">117.00</em>
                                </div>
                            </li>
                            <li class="td td-op">
                                <div class="td-inner">
                                    <a title="移入收藏夹" class="btn-fav" href="#">移入收藏夹</a>
                                    <a href="javascript:;" data-point-url="#" class="delete">删除</a>
                                </div>
                            </li>
                        </ul>
                        <ul class="item-content clearfix">
                            <li class="td td-chk">
                                <div class="cart-checkbox ">
                                    <input class="check" id="J_CheckBox_170037950254" name="items[]" value="170037950254" type="checkbox">
                                    <label for="J_CheckBox_170037950254"></label>
                                </div>
                            </li>
                            <li class="td td-item">
                                <div class="item-pic">
                                    <a href="#" target="_blank" data-title="美康粉黛醉美东方唇膏口红正品 持久保湿滋润防水不掉色护唇彩妆" class="J_MakePoint" data-point="tbcart.8.12">
                                        <img src="/Mjs/images/kouhong.jpg_80x80.jpg" class="itempic J_ItemImg"></a>
                                </div>
                                <div class="item-info">
                                    <div class="item-basic-info">
                                        <a href="#" target="_blank" title="美康粉黛醉美唇膏 持久保湿滋润防水不掉色" class="item-title J_MakePoint" data-point="tbcart.8.11">美康粉黛醉美唇膏 持久保湿滋润防水不掉色</a>
                                    </div>
                                </div>
                            </li>
                            <li class="td td-info">
                                <div class="item-props item-props-can">
                                    @* <span class="sku-line">颜色：12#川南玛瑙</span>
                                    <span class="sku-line">包装：裸装</span>
                                    <span tabindex="0" class="btn-edit-sku theme-login">修改</span>
                                    <i class="theme-login am-icon-sort-desc"></i>*@
                                </div>
                            </li>
                            <li class="td td-price">
                                <div class="item-price price-promo-promo">
                                    <div class="price-content">
                                      
                                        <div class="price-line">
                                            <em class="J_Price price-now" tabindex="0">39.00</em>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li class="td td-amount">
                                <div class="amount-wrapper ">
                                    <div class="item-amount ">
                                        <div class="sl">
                                            <input class="min am-btn" name="" type="button" value="-" />
                                            <input class="text_box" name="" type="text" value="3" style="width: 30px;" />
                                            <input class="add am-btn" name="" type="button" value="+" />
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li class="td td-sum">
                                <div class="td-inner">
                                    <em tabindex="0" class="J_ItemSum number">117.00</em>
                                </div>
                            </li>
                            <li class="td td-op">
                                <div class="td-inner">
                                    <a title="移入收藏夹" class="btn-fav" href="#">移入收藏夹</a>
                                    <a href="javascript:;" data-point-url="#" class="delete">删除</a>
                                </div>
                            </li>
                        </ul>



                    </div>
                </div>
            </tr>
            <div class="clear"></div>


        </div>
        <div class="clear"></div>

        <div class="float-bar-wrapper">
            <div id="J_SelectAll2" class="select-all J_SelectAll">
                <div class="cart-checkbox">
                    <input class="check-all check" id="J_SelectAllCbx2" name="select-all" value="true" type="checkbox">
                    <label for="J_SelectAllCbx2"></label>
                </div>
                <span>全选</span>
            </div>
            <div class="operations">
                <a href="javascript:Delshop();" hidefocus="true" class="deleteAll">删除</a>
                <a href="#" hidefocus="true" class="J_BatchFav">移入收藏夹</a>
            </div>
            <div class="float-bar-right">
                <div class="amount-sum">
                    <span class="txt">已选商品</span>
                    <em id="J_SelectedItemsCount">0</em><span class="txt">件</span>
                    <div class="arrow-box">
                        <span class="selected-items-arrow"></span>
                        <span class="arrow"></span>
                    </div>
                </div>
                <div class="price-sum">
                    <span class="txt">合计:</span>
                    <strong class="price">¥<em id="J_Total">0.00</em></strong>
                </div>
                <div class="btn-area">
                    <a href="pay.html" id="J_Go" class="submit-btn submit-btn-disabled" aria-label="请注意如果没有选择宝贝，将无法结算">
                        <span>结&nbsp;算</span></a>
                </div>
            </div>

        </div>

        <div class="footer">
            <div class="footer-hd">
                <p>
                    <a href="#">恒望科技</a>
                    <b>|</b>
                    <a href="#">商城首页</a>
                    <b>|</b>
                    <a href="#">支付宝</a>
                    <b>|</b>
                    <a href="#">物流</a>
                </p>
            </div>
            <div class="footer-bd">
                <p>
                    <a href="#">关于恒望</a>
                    <a href="#">合作伙伴</a>
                    <a href="#">联系我们</a>
                    <a href="#">网站地图</a>
                    <em>© 2015-2025 Hengwang.com 版权所有. 更多模板 <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></em>
                </p>
            </div>
        </div>

    </div>

    <!--操作页面-->

    <div class="theme-popover-mask"></div>

    <!--引导 -->
    <div class="navCir">
        <li><a href="home2.html"><i class="am-icon-home "></i>首页</a></li>
        <li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
        <li class="active"><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>
        <li><a href="/Mjs/person/index.html"><i class="am-icon-user"></i>我的</a></li>
    </div>
</body>
</html>
